HA$PBExportHeader$u_cst_tab_asig_mcomp_mcaract.sru
forward
global type u_cst_tab_asig_mcomp_mcaract from u_cst_tab_asignaciones
end type
end forward

global type u_cst_tab_asig_mcomp_mcaract from u_cst_tab_asignaciones
end type
global u_cst_tab_asig_mcomp_mcaract u_cst_tab_asig_mcomp_mcaract

on u_cst_tab_asig_mcomp_mcaract.create
int iCurrent
call super::create
end on

on u_cst_tab_asig_mcomp_mcaract.destroy
call super::destroy
end on

type dw_2 from u_cst_tab_asignaciones`dw_2 within u_cst_tab_asig_mcomp_mcaract
string dataobject = "d_mcaractcomp_grid"
end type

type dw_1 from u_cst_tab_asignaciones`dw_1 within u_cst_tab_asig_mcomp_mcaract
integer x = 96
integer y = 428
string dataobject = ""
end type

type ddlb_2 from u_cst_tab_asignaciones`ddlb_2 within u_cst_tab_asig_mcomp_mcaract
end type

event ddlb_2::selectionchanged;if index<=0 then return

if dw_1.rowcount()>0 then
	if  MessageBox("Sistema", "Desea cancelar los cambios", Question!, OKCancel!, 1) = 2 then return
end if

is_toolbar = gs_col1_uo_ddlb[index]

dw_1.retrieve(integer(is_toolbar))
commit;


end event

type pb_2 from u_cst_tab_asignaciones`pb_2 within u_cst_tab_asig_mcomp_mcaract
end type

type sle_1 from u_cst_tab_asignaciones`sle_1 within u_cst_tab_asig_mcomp_mcaract
end type

type st_1 from u_cst_tab_asignaciones`st_1 within u_cst_tab_asig_mcomp_mcaract
end type

type pb_1 from u_cst_tab_asignaciones`pb_1 within u_cst_tab_asig_mcomp_mcaract
end type

type cb_3 from u_cst_tab_asignaciones`cb_3 within u_cst_tab_asig_mcomp_mcaract
end type

event cb_3::clicked;Long ll_count
integer li_find_dw1,li_fila,li_find
string ls_button[],ls_boton
integer li_button[]
// Get each of the selected
li_button = dw_1.Object.idcaract.Current.Selected
// Find the number of selected items by finding the size of the array
ll_count = upperBound(li_button)

for li_fila = 1 to ll_count
		
	ls_boton =string( li_button[li_fila])
	li_find = dw_1.find('string(idcaract) = "'+ls_boton+'"',1,dw_2.rowcount())
//	
//	li_find_dw1 = dw_1.find('idbutton = "'+ls_boton+'"',1,dw_1.rowcount())
//	if li_find_dw1 <> 0  then
//		continue
//	end if
	
	dw_1.deleterow(li_find)
//	dw_1.scrolltorow(dw_1.insertrow(0))
//	dw_1.object.idtoolbar[dw_1.rowcount()] =is_toolbar
//	dw_1.object.idbutton[dw_1.rowcount()] =ls_boton

next
end event

type cb_2 from u_cst_tab_asignaciones`cb_2 within u_cst_tab_asig_mcomp_mcaract
end type

event cb_2::clicked;Long ll_count
integer li_find_dw1,li_fila,li_find
string ls_button[],ls_boton
integer li_button[]
// Get each of the selected
li_button = dw_2.Object.idcaract.Current.Selected
// Find the number of selected items by finding the size of the array
ll_count = upperBound(li_button)

for li_fila = 1 to ll_count
		
	ls_boton =string( li_button[li_fila])
	li_find = dw_2.find('string(idcaract) = "'+ls_boton+'"',1,dw_2.rowcount())
	
	li_find_dw1 = dw_1.find('string(idcaract) = "'+ls_boton+'"',1,dw_1.rowcount())
	if li_find_dw1 <> 0  then
		continue
	end if
	
	//dw_2.deleterow(li_find)
	dw_1.scrolltorow(dw_1.insertrow(0))
	dw_1.object.idcomp[dw_1.rowcount()] =integer(is_toolbar)
	dw_1.object.idcaract[dw_1.rowcount()] =integer(ls_boton)

next

//f_msj('hola'+ string(ll_count),4)


end event

type uo_xplistbar from u_cst_tab_asignaciones`uo_xplistbar within u_cst_tab_asig_mcomp_mcaract
end type

type sle_buscar from u_cst_tab_asignaciones`sle_buscar within u_cst_tab_asig_mcomp_mcaract
end type

type ddlb_1 from u_cst_tab_asignaciones`ddlb_1 within u_cst_tab_asig_mcomp_mcaract
end type

type uo_powerdock from u_cst_tab_asignaciones`uo_powerdock within u_cst_tab_asig_mcomp_mcaract
end type

type uo_toolbarstrip from u_cst_tab_asignaciones`uo_toolbarstrip within u_cst_tab_asig_mcomp_mcaract
end type

type uo_gb_listado from u_cst_tab_asignaciones`uo_gb_listado within u_cst_tab_asig_mcomp_mcaract
end type

type uo_gb_asig from u_cst_tab_asignaciones`uo_gb_asig within u_cst_tab_asig_mcomp_mcaract
end type

type uo_gb_borde from u_cst_tab_asignaciones`uo_gb_borde within u_cst_tab_asig_mcomp_mcaract
end type

